package com.docking.heylo.dao.mapper;

import com.docking.heylo.dao.entity.Appointment;
import com.docking.heylo.dao.entity.AppointmentExample;

import java.util.Date;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

public interface AppointmentMapper {
    long countByExample(AppointmentExample example);

    int deleteByExample(AppointmentExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Appointment record);

    int insertSelective(Appointment record);

    List<Appointment> selectByExample(AppointmentExample example);

    Appointment selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Appointment record, @Param("example") AppointmentExample example);

    int updateByExample(@Param("record") Appointment record, @Param("example") AppointmentExample example);

    int updateByPrimaryKeySelective(Appointment record);

    int updateByPrimaryKey(Appointment record);


    List<Map<String,Object>> ordersForUser(@Param("status") Integer status, @Param("userId") int userId, @Param("type") int type);

    Appointment selectByPrimaryKeyForUpdate(@Param("id") Integer id);

    List<Map<String, Object>> orderList(@Param("userId") Integer userId, @Param("userPhone") String userPhone,
                                        @Param("appeal") Boolean appeal, @Param("appealStatus") Integer appealStatus,
    @Param("status") Integer status);




    List<Appointment> selectNotConfirmationList(@Param("beginTime") Date beginTime, @Param("endTime") Date endTime);

}